Skip to content

[Feat] XRP 결제 목록 및 상세 패널 페이지 구현#21

Merged
BaeSeong-min merged 15 commits into
developfrom
feat/#20
May 12, 2026
Merged

[Feat] XRP 결제 목록 및 상세 패널 페이지 구현#21
BaeSeong-min merged 15 commits into
developfrom
feat/#20

Conversation

@BaeSeong-min

@BaeSeong-min BaeSeong-min commented May 12, 2026

Copy link
Copy Markdown
Contributor

🔍 PR 요약

  • 에스크로 결제 상세/목록 페이지(PaymentDetail · PaymentsPage)를 사용 가능한 수준으로 완성

🧾 관련 이슈

🛠️ 주요 변경 사항

에스크로 결제 페이지

  • PaymentDetail 완성: 결제 개시 모달, 이벤트 확정 모달, 이전 에스크로 미완료 시 다음 이벤트 잠금, 토스트 알림, 하드코딩 영문 → i18n 분리
  • PaymentsPagepages/payment/ 하위로 이동 + PageHero 적용
  • 결제 목록에 EscrowProgressBar 도입(PROCESSING/ACTIVE 상태에서 항목별 진행률 시각화)
  • 목록 탭을 "보낸/받은" → "진행중/종료(ongoing/done)"로 재정의 (응답에 sender 식별 필드가 없어 프론트 단독 분류 불가, 백엔드 group 파라미터에 맞춤)

API · 모델 정리

  • escrowPaymentsApi.getList: group: "ongoing" | "done" / status enum으로 타입 타이트닝
  • CreateEscrowPaymentDto: buyerId + sellerWalletAddresscounterpartyWalletAddress로 단일화 (세션 기반 인증으로 buyerId는 서버 식별)
  • useEscrowPayments 훅에 승인/이벤트 승인/결제 개시 토스트 알림 및 잔액 부족 메세지 처리 추가

컴포넌트 리팩토링

  • EscrowPaymentModal → 범용 ConfirmModal로 일반화 (제목/부제/버튼 라벨 props), components/ 루트로 이동
  • 결제 개시 + 이벤트 확정(구매자/판매자) 양쪽에서 동일 컴포넌트 재사용

애니메이션

  • 랜딩 hero: 텍스트 stagger fade+slide-up, 강조 박스 clipPath 좌→우 wipe
  • EscrowProgressBar: 각 단계 원 scale+색상 전환, 점선 clipPath wipe로 단계 간 순차 reveal
  • PaymentDetail 총 금액 0 → totalAmountXrp count-up (useCountUp 훅)
  • 결제 목록 row stagger 마운트 (index * 0.04s 딜레이)
  • 우측 detail 패널 AnimatePresence mode="wait" 기반 slide-in / cross-fade

부수 정리

  • MyInfo에서 소개/제품/웹사이트 입력 필드 제거 (수정 API 미지원 영역)
  • SegmentedControl 활성 탭 외곽선 제거

🧠 의도 및 배경

  • 에스크로 결제의 핵심 시나리오(생성 → 양측 승인 → buyer 결제 개시 → 항목별 이벤트 확정 → XRP 해제)를 사용자가 실제로 수행할 수 있도록 UI/API를 정합시키는 것이 1차 목표

Summary by CodeRabbit

  • 새로운 기능

    • XRP 기반 결제 및 에스크로우 관리 시스템 추가
    • 결제 상세 정보 조회 및 실시간 상태 추적 기능
    • 에스크로우 진행 상황을 시각적으로 표시하는 프로그레스 바
    • 결제 승인/거절 확인 모달 추가
  • 사용자 인터페이스 개선

    • 랜딩 페이지 애니메이션 효과 추가

- escrowPayments: getList, approveEvent 추가 및 approve action 파라미터 지원
- endpoints에 approveEvent 경로 추가
- useBuyer, useCompany, useEscrowPaymentList/useEscrowPayment 등 단건/목록 조회 hooks 추가
- 에스크로 결제 단건 상세, 항목별 승인 UI, 결제 개시 동작
- 양측 지갑 주소는 에스크로 결제 응답 필드와 내 프로필에서 직접 추출
- PaymentsPage 위치를 src/pages/payment/ 하위로 정리
- 인라인 히어로 마크업을 공용 PageHero 컴포넌트로 교체
- 헤더 XRP Payment 네비게이션을 /payments/create → /payments로 변경
payments_hero_title 한글 locale이 영문과 동일하게 노출되던 문제 수정
buyerId/sellerWalletAddress 두 필드로 나뉘어 있던 구조를 백엔드 API
스펙(CreateEscrowPaymentDto)에 맞춰 counterpartyWalletAddress 하나로
통합. 세션 기반 인증으로 buyerId는 서버에서 식별.
- 에스크로 결제 개시 확인 모달 추가 (EscrowPaymentModal)
- buyer가 APPROVED 상태에서 결제를 개시할 수 있는 버튼/모달 흐름 구현
- 이전 에스크로가 모두 RELEASED여야 다음 항목 이벤트 승인 가능하도록 잠금 처리
- 승인/이벤트승인/결제개시 hook에 toast 알림 및 잔액 부족 메세지 처리 추가
- 하드코딩된 영문 문자열을 i18n으로 분리 (모달/디테일 키 추가)
- 식별 기준을 companyId → role 기반 isBuyer로 단순화
- 결제 항목 진행 상태를 시각화하는 EscrowProgressBar 컴포넌트 추가
- PaymentsPage에서 PROCESSING/ACTIVE 상태는 progress bar로 렌더링,
  COMPLETED/CANCELLED는 별도 라벨로 표시
- 보낸/받은 탭은 응답에 sender 식별 필드가 없어 프론트 단독 분류가
  불가능하므로, 백엔드 group 파라미터 스펙(ongoing/done)에 맞춰 탭의
  의미를 진행 상태 그룹으로 재정의
- escrowPaymentsApi.getList 파라미터를 group/status enum으로 타이트닝
- 관련 i18n 키 추가 및 col_amount 줄바꿈 표시 적용
결제 개시 전용이던 모달을 ConfirmModal로 리네임/일반화. 제목·부제·
버튼 라벨을 props로 받아 다양한 확정 흐름에서 재사용할 수 있도록 변경.
파일 위치도 components/payment에서 components 루트로 이동.
취소 버튼 라벨도 짧게 정리.
구매자/판매자 확정 버튼 클릭 시 바로 approveEvent를 호출하지 않고
ConfirmModal로 한 번 더 확인받도록 EventRow에 모달 흐름 추가.
event_confirm_modal_* i18n 키 추가.
framer-motion으로 tagline·hero 라인·description·CTA를 순차 fade+slide-up
하고, 강조 박스는 clipPath 좌→우 wipe로 박스와 텍스트가 함께
reveal되도록 처리.
각 단계 원이 scale 0.5→1 + 배경색 전환으로 등장, 점선은 clipPath 좌→우
wipe로 채워지면서 단계 간 stagger로 순차 reveal.
framer-motion animate()를 이용한 useCountUp 훅 추가. 0에서 totalAmountXrp
까지 ease-out으로 카운트업. paymentId가 바뀌면(다른 row 선택) 새 값에
맞춰 다시 한 번 재생.
- PaymentRow를 motion.tr로 변환, index 기반 0.04s stagger로 순차 마운트
- 우측 PaymentDetail 패널을 AnimatePresence mode="wait"로 감싸고
  selectedId 변경 시 opacity + x 슬라이드로 cross-fade 전환
@BaeSeong-min BaeSeong-min self-assigned this May 12, 2026
@vercel

vercel Bot commented May 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
k-statra-frontend Ready Ready Preview, Comment May 12, 2026 6:50am

@BaeSeong-min BaeSeong-min merged commit 322a35e into develop May 12, 2026
3 checks passed
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 675d7e14-33ec-45ae-80f0-be0a73310252

📥 Commits

Reviewing files that changed from the base of the PR and between a85886b and 5434ce4.

📒 Files selected for processing (17)
  • src/apis/endpoints.ts
  • src/apis/modules/escrowPayments.ts
  • src/components/ConfirmModal.jsx
  • src/components/Header.jsx
  • src/components/SegmentedControl.jsx
  • src/components/payment/EscrowProgressBar.jsx
  • src/hooks/payments/useEscrowPayments.js
  • src/hooks/useBuyers.js
  • src/hooks/useCompanies.js
  • src/lib/i18n/dict.js
  • src/pages/LandingPage.jsx
  • src/pages/PaymentsPage.jsx
  • src/pages/myBusiness/MyInfo.jsx
  • src/pages/payment/PaymentDetail.jsx
  • src/pages/payment/PaymentRequestForm.jsx
  • src/pages/payment/PaymentsPage.jsx
  • src/router.jsx

📝 Walkthrough

워크스루

XRP 결제 목록 및 상세 패널 페이지를 새로 구현합니다. API 계층에서 스키마와 엔드포인트를 업데이트하고, 데이터 페칭용 React Query 훅을 추가하며, 모달과 진행률 표시줄 컴포넌트를 작성하고, 좌측 목록과 우측 상세 패널로 구성된 PaymentsPage를 구현합니다.

변경사항

XRP 결제 API 및 데이터 페칭 계층

레이어 / 파일 요약
API 스키마 및 엔드포인트
src/apis/endpoints.ts, src/apis/modules/escrowPayments.ts
CreateEscrowPaymentDtocounterpartyWalletAddress를 도입하고 buyerId/sellerWalletAddress를 제거합니다. escrowPaymentsApigetList(params) 메서드를 추가하고, approve(id, action?)를 선택적 수락/거절 액션으로 업데이트하며, approveEvent(id, escrowId, type) 엔드포인트를 새로 추가합니다.
React Query 훅
src/hooks/payments/useEscrowPayments.js, src/hooks/useBuyers.js, src/hooks/useCompanies.js
useEscrowPaymentList, useEscrowPayment, useApproveEscrowPayment, useApproveEscrowEvent, usePayEscrow 훅이 페치/뮤테이션 로직과 캐시 무효화, 토스트 에러 처리를 제공합니다. useBuyer, useCompany 훅도 추가되어 단일 항목 조회를 지원합니다.

결제 UI 컴포넌트

레이어 / 파일 요약
모달 및 진행률 UI
src/components/ConfirmModal.jsx, src/components/payment/EscrowProgressBar.jsx, src/components/SegmentedControl.jsx
ConfirmModal은 Escape 닫기, 보류 중 상태 처리, Cancel/Confirm 버튼을 제공합니다. EscrowProgressBar는 최대 3단계의 번호 매김 스텝 노드와 애니메이션 연결선을 렌더링합니다. SegmentedControl의 탭 인디케이터 스타일이 정리됩니다.
결제 목록 및 상세 페이지
src/pages/payment/PaymentsPage.jsx, src/pages/payment/PaymentDetail.jsx
PaymentsPage는 Received/Sent 탭, 페이지네이션 테이블, 행 선택을 구현합니다. 표 셀은 요청 날짜, 금액, 진행률 상태(EscrowProgressBar 또는 상태 레이블)를 렌더링합니다. PaymentDetail은 지갑 정보, 총액(애니메이션 숫자), 에스크로 항목 목록, 이벤트별 확인 모달, 결제 액션 버튼을 표시합니다.
결제 요청 양식 및 라우팅
src/pages/payment/PaymentRequestForm.jsx, src/router.jsx, src/components/Header.jsx
PaymentRequestForm이 새 counterpartyWalletAddress 필드를 사용하도록 수정되고, 라우터가 새로운 PaymentsPage 경로를 임포트하며, Header 네비게이션이 /payments로 업데이트됩니다.

국제화 및 지원 변경사항

레이어 / 파일 요약
다국어 번역 추가
src/lib/i18n/dict.js
결제 UI 텍스트(하이브리드 결제 시스템 제목, 탭/상태 레이블, 표 헤더, 상태 배지, 에스크로 완료 텍스트, 모달 문구)가 영어와 한국어로 추가됩니다.
시각적 개선
src/pages/LandingPage.jsx, src/pages/myBusiness/MyInfo.jsx
LandingPage는 framer-motion으로 태그라인, 제목, 강조 영역, CTA 버튼에 페이드-업 및 클립패스 애니메이션을 적용합니다. MyInfo는 회사 소개, 상품 소개, 웹사이트 URL 필드를 제거합니다.
sequenceDiagram
    actor User
    participant UI as PaymentsPage
    participant Hooks as React Query<br/>useEscrowPaymentList
    participant API as escrowPaymentsApi
    participant Server as Backend API

    User->>UI: 탭 선택 (Received/Sent)
    UI->>Hooks: useEscrowPaymentList(group, page)
    Hooks->>API: getList({group, page, limit})
    API->>Server: GET /escrow-payments?group=...&page=...
    Server-->>API: [{id, amount, status, escrows[]}, ...]
    API-->>Hooks: 캐시 저장
    Hooks-->>UI: 결제 목록 데이터
    UI->>UI: 테이블 렌더링<br/>(EscrowProgressBar 상태)

    User->>UI: 결제 행 클릭
    UI->>UI: selectedId 설정
    UI->>Hooks: useEscrowPayment(selectedId)
    Hooks->>API: getById(selectedId)
    API->>Server: GET /escrow-payments/{id}
    Server-->>API: {id, amount, escrows[{id, events[]}]}
    API-->>Hooks: 캐시 저장
    Hooks-->>UI: 상세 데이터
    UI->>UI: PaymentDetail 렌더링

    User->>UI: 에스크로 이벤트<br/>확인 버튼 클릭
    UI->>UI: ConfirmModal 표시
    User->>UI: Confirm 클릭
    UI->>Hooks: useApproveEscrowEvent<br/>(paymentId, escrowId, type)
    Hooks->>API: approveEvent(...)
    API->>Server: POST /escrow-payments/{id}/escrows/{escrowId}/events/{type}/approve
    Server-->>API: {status: "success"}
    API-->>Hooks: 결과
    Hooks->>Hooks: 캐시 무효화<br/>(single payment)
    Hooks-->>UI: 성공 토스트
    UI->>UI: 이벤트 상태<br/>업데이트
Loading

예상 코드 리뷰 노력

🎯 4 (복잡) | ⏱️ ~60분

관련 PR

  • K-Statra/frontend#16: escrowPayments API 엔드포인트와 메서드를 모두 수정하므로 관련이 있습니다.

결제 목록 춤을 추며,
상세 패널이 부드럽게 스르륵,
에스크로 단계별 진행 표시줄,
모달 버튼들 반짝반짝,
토끼의 결제 세계가 완성되네! 🐰✨
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#20

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] XRP 결제 목록 및 상세 패널 페이지 구현

1 participant